home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Text / WASTE / WASTE 1.1.2 Distribution / Pseudo-UPI for THINK Pascal / QDOffscreen.p < prev    next >
Encoding:
Text File  |  1995-10-12  |  3.5 KB  |  104 lines  |  [TEXT/PJMM]

  1.  UNIT QDOffscreen;
  2.  
  3. { Pascal Interface to the Macintosh Libraries }
  4.  
  5. { Copyright © Apple Computer Inc. }
  6. { All Rights Reserved }
  7.  
  8. { Adapted for use with THINK Pascal 4.0.x by Marco Piovanelli }
  9.  
  10.  INTERFACE
  11.  
  12. CONST
  13.     pixPurgeBit                    = 0;
  14.     noNewDeviceBit                = 1;
  15.     useTempMemBit                = 2;
  16.     keepLocalBit                = 3;
  17.     pixelsPurgeableBit            = 6;
  18.     pixelsLockedBit                = 7;
  19.     mapPixBit                    = 16;
  20.     newDepthBit                    = 17;
  21.     alignPixBit                    = 18;
  22.     newRowBytesBit                = 19;
  23.     reallocPixBit                = 20;
  24.     clipPixBit                    = 28;
  25.     stretchPixBit                = 29;
  26.     ditherPixBit                = 30;
  27.     gwFlagErrBit                = 31;
  28.  
  29.     pixPurge = $00000001;
  30.     noNewDevice = $00000002;
  31.     useTempMem = $00000004;
  32.     keepLocal = $00000008;
  33.     pixelsPurgeable = $00000040;
  34.     pixelsLocked = $00000080;
  35.     mapPix = $00010000;
  36.     newDepth = $00020000;
  37.     alignPix = $00040000;
  38.     newRowBytes = $00080000;
  39.     reallocPix = $00100000;
  40.     clipPix = $10000000;
  41.     stretchPix = $20000000;
  42.     ditherPix = $40000000;
  43.     flagErr = $80000000;
  44.  
  45.     
  46. TYPE
  47.     GWorldFlags = LONGINT;
  48.  
  49. { Type definition of a GWorldPtr }
  50.     GWorldPtr = CGrafPtr;
  51.  
  52.  
  53. FUNCTION NewGWorld(VAR offscreenGWorld: GWorldPtr; PixelDepth: INTEGER; {CONST}VAR boundsRect: Rect; cTable: CTabHandle; aGDevice: GDHandle; flags: GWorldFlags): QDErr;
  54.     INLINE $203C, $0016, $0000, $AB1D;
  55. FUNCTION LockPixels(pm: PixMapHandle): BOOLEAN;
  56.     INLINE $203C, $0004, $0001, $AB1D;
  57. PROCEDURE UnlockPixels(pm: PixMapHandle);
  58.     INLINE $203C, $0004, $0002, $AB1D;
  59. FUNCTION UpdateGWorld(VAR offscreenGWorld: GWorldPtr; pixelDepth: INTEGER; {CONST}VAR boundsRect: Rect; cTable: CTabHandle; aGDevice: GDHandle; flags: GWorldFlags): GWorldFlags;
  60.     INLINE $203C, $0016, $0003, $AB1D;
  61. PROCEDURE DisposeGWorld(offscreenGWorld: GWorldPtr);
  62.     INLINE $203C, $0004, $0004, $AB1D;
  63. PROCEDURE GetGWorld(VAR port: CGrafPtr; VAR gdh: GDHandle);
  64.     INLINE $203C, $0008, $0005, $AB1D;
  65. PROCEDURE SetGWorld(port: CGrafPtr; gdh: GDHandle);
  66.     INLINE $203C, $0008, $0006, $AB1D;
  67. PROCEDURE CTabChanged(ctab: CTabHandle);
  68.     INLINE $203C, $0004, $0007, $AB1D;
  69. PROCEDURE PixPatChanged(ppat: PixPatHandle);
  70.     INLINE $203C, $0004, $0008, $AB1D;
  71. PROCEDURE PortChanged(port: GrafPtr);
  72.     INLINE $203C, $0004, $0009, $AB1D;
  73. PROCEDURE GDeviceChanged(gdh: GDHandle);
  74.     INLINE $203C, $0004, $000A, $AB1D;
  75. PROCEDURE AllowPurgePixels(pm: PixMapHandle);
  76.     INLINE $203C, $0004, $000B, $AB1D;
  77. PROCEDURE NoPurgePixels(pm: PixMapHandle);
  78.     INLINE $203C, $0004, $000C, $AB1D;
  79. FUNCTION GetPixelsState(pm: PixMapHandle): GWorldFlags;
  80.     INLINE $203C, $0004, $000D, $AB1D;
  81. PROCEDURE SetPixelsState(pm: PixMapHandle; state: GWorldFlags);
  82.     INLINE $203C, $0008, $000E, $AB1D;
  83. FUNCTION GetPixBaseAddr(pm: PixMapHandle): Ptr;
  84.     INLINE $203C, $0004, $000F, $AB1D;
  85. FUNCTION NewScreenBuffer({CONST}VAR globalRect: Rect; purgeable: BOOLEAN; VAR gdh: GDHandle; VAR offscreenPixMap: PixMapHandle): QDErr;
  86.     INLINE $203C, $000E, $0010, $AB1D;
  87. PROCEDURE DisposeScreenBuffer(offscreenPixMap: PixMapHandle);
  88.     INLINE $203C, $0004, $0011, $AB1D;
  89. FUNCTION GetGWorldDevice(offscreenGWorld: GWorldPtr): GDHandle;
  90.     INLINE $203C, $0004, $0012, $AB1D;
  91. FUNCTION QDDone(port: GrafPtr): BOOLEAN;
  92.     INLINE $203C, $0004, $0013, $AB1D;
  93. FUNCTION OffscreenVersion: LONGINT;
  94.     INLINE $7014, $AB1D;
  95. FUNCTION NewTempScreenBuffer({CONST}VAR globalRect: Rect; purgeable: BOOLEAN; VAR gdh: GDHandle; VAR offscreenPixMap: PixMapHandle): QDErr;
  96.     INLINE $203C, $000E, $0015, $AB1D;
  97. FUNCTION PixMap32Bit(pmHandle: PixMapHandle): BOOLEAN;
  98.     INLINE $203C, $0004, $0016, $AB1D;
  99. FUNCTION GetGWorldPixMap(offscreenGWorld: GWorldPtr): PixMapHandle;
  100.     INLINE $203C, $0004, $0017, $AB1D;
  101.  
  102. implementation
  103.  END.
  104.